home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 489 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. From: "Paul D. DeRocco" <pderocco@ix.netcom.com>
  2. Message-ID: <3125C1DC.35AE@ix.netcom.com>
  3. X-Original-Date: Sat, 17 Feb 1996 06:54:04 -0500
  4. Path: in1.uu.net!bounce-back
  5. Date: 17 Feb 96 12:28:43 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. Newsgroups: comp.std.c++
  9. X-Mailer: Mozilla 2.0b6a (Win95; I)
  10. Subject: Numeric literal formats
  11. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  12.     iQBFAgUBMSXKC+EDnX0m9pzZAQFqKAF8C7Hczr/GQokrVzKk7/8V/1Kw3Z5ARI9v
  13.     4nM8CRUnz84mD7b9KAJbKl9p4q077GoD
  14.     =g247
  15.  
  16. Why, oh why, aren't we allowed to write binary numbers in C++? The 
  17. standard could trivially be extended by allowing binary numbers to be 
  18. written, prefixed with 0b, or perhaps 0y. This makes bit masks _much_ 
  19. easier to read. And it wouldn't break any presently legal program.
  20.  
  21. Another related improvement would be to allow embedded underscores in 
  22. numbers, for clarity. 1_000_000_000 is obviously a billion, while 
  23. 1000000000 is not so obviously a billion. Same for 0x8000_0000, or 
  24. 0y0001_1110_0000_0000. Again, it doesn't break anything.
  25.  
  26. Oh heck, I might as well throw this in. Why isn't there an escape for 
  27. escape? That is, why can't \e be defined as \x1B, since it's such a 
  28. common control character?
  29.  
  30. -- 
  31.  
  32. Ciao,
  33. Paul D. DeRocco
  34. ---
  35. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  36.   Contact address: std-c++-request@ncar.ucar.edu.  Moderation policy:
  37.   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  38.